<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title></title>
    <script src='./vue.global.js'></script>
</head>
<body>
    <div id='app'>
        <base-layout>

            <!-- template幽灵标签以内的内容均插入名为head的插槽内 -->
            <template v-slot:head>
                <h3>哥是标题</h3>
            </template>

            <!-- template幽灵标签以内的内容均插入名为foot的插槽内 -->
            <template v-slot:foot>
                <h3>姐是页脚</h3>
            </template>

            <template v-slot:default>
                <p>大海啊你全特么是水</p>
                <p>蜘蛛啊你全特么是大长腿</p>
                <p>辣椒啊真特么辣嘴</p>
                <p>不好好学Vue真特么后悔</p>
            </template>

        </base-layout>
    </div>

    <script>
        const app = Vue.createApp({
            data(){
                return {}
            },
            methods:{},
            computed:{}
        })

        app.component("base-layout",{
            template:`
            <div>
                <header>
                    <slot name="head"></slot>
                </header>

                <main>
                    <!-- name="default" -->
                    <slot></slot>
                </main>

                <footer>
                    <slot name="foot"></slot>
                </footer>
            </div>
            `
        })

        app.mount('#app')
    </script>
</body>
</html>